<template>
  <div class="loading">
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
  </div>
</template>

<script>
export default {
  data () {
    return {

    }
  }
}

</script>

<style lang="less" scoped>
  .loading {
    display: flex;
    justify-content: center;
    align-content: center;
    width: 80px;
    height: 20px;
    margin: 0 auto;

    span {
      display: inline-block;
      width: 2px;
      height: 100%;
      border-radius: 3px;
      margin-left: 1px;
      transform-origin: bottom;
      background: rgb(240, 60, 60);
      animation: load 0.5s linear infinite;
    }
     span:nth-child(1) {
      animation-delay: 0s;
    }
    span:nth-child(2) {
      animation-delay: 0.2s;
    }
    span:nth-child(3) {
      animation-delay: 0.4s;
    }
    span:nth-child(4) {
      animation-delay: 0.6s;
    }
    span:nth-child(5) {
      animation-delay: 0.8s;
    }
  }

  @keyframes load {
    0%{
      transform: scaleY(1);
    }

    50% {
       transform: scaleY(0.5);
    }
    100%{
      transform: scaleY(1);
    }
  }

</style>
